package com.chen.pojo.model;


import cn.hutool.core.date.DateUtil;
import com.chen.pojo.Stu;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class StuModel {

    private int id;
    private String height;
    private String name;
    private int age;
    private String sex;
    private String member;
    private String number;
    private String date;
    private String address;
    private String hobby;
    private String weight;




    public StuModel(Stu stu) {
        this.id = stu.getId();
        this.height=stu.getHeight();
        this.name = stu.getName();
        this.age = stu.getAge();

        this.sex=stu.getSex();
        this.member = stu.getMember();
        this.number = stu.getNumber();
        this.date = DateUtil.format(stu.getDate(), "yyyy-MM-dd HH:mm:ss");
        this.address = stu.getAddress();
        this.hobby = stu.getHobby();
        this.weight = stu.getWeight();
    }


}
